Copyright: Visual Help Copyright® 1993 Firas Bushnaq


CONTENTS
Project Wizard Version 1.0

Contents

Introduction

Tool Summary

Features & Functions

Global Options

Acknowledgements

Project Wizard Startup

Closing Project Wizard


Introduction

Welcome to Project Wizard 1.0.  Project Wizard is a collection of tools and functions that enhance the Visual Basic development environment.

These tools take the frustration out of aligning controls, viewing properties, and setting the value of certain properties such as the tabindex, helpcontextid and others.  In addition, Project Wizard can search any form in your project and report duplicate access keys, lock controls to a form to prevent accidentally disturbing the alignment, and build control templates for commonly used control properties and control types.

We hope you'll find Project Wizard useful.  If you have any suggestions for future enhancements call us or write to:

John C. Taylor
3875 Holcomb Bridge Rd.
Suite 3
Norcross, Georgia  30092
(404)-449-6284


Tool Summary

Control Alignment Tools:

Align selected controls with the left edge of the source control.

Align selected controls with the right edge of the source control.

Align selected controls with the top edge of the source control.

Align selected controls with the bottom edge of the source control.

Stack selected controls on top of source control.

Stack selected controls under source control.

Stack selected controls horizontally to left of source control.

Stack selected controls horizontally to right of source control.

Insert the source control between the first and second selected control vertically.

Insert the source control between the first and second selected control horizontally.

Control Resizing Tools:

Size controls by Width.

Size controls by Height.

Size controls by Height and Width.

Property Manipulation Tools:

Set or reset FontBold property for selected controls.

Set or reset FontItalic property for selected controls.

Set or reset FontUnderline property for selected controls.

Copy value of specified property to selected controls.

Clear text property of selected controls.

Make or delete control template.

Apply control template to selected controls.

View or Set Tabindex property of controls.

Show control names on screen

Set textbox alignment properties

Set Color Property

View selected property for controls on screen.

Other Tools & Functions:

Invoke HelpcontextId Assistant

Lock Control position and size.

Scan form and controls for duplicate access keys.

Reindex Broken control arrays

Message Box generator

Code Finder

Set picture property

Set access key

Set global options.

Tool tips on/off.

Project Wizard help.

Close Project Wizard.


Project Wizard Features

Property Wizard speeds the application development process by providing functions to not only facilitate the alignment and resizing of controls, but functions to analyze control properties and manipulate them where necessary.

Tools & Functions:

Control Alignment

Control Resizing

Property Manipulation & Other tools

Control Locking

Viewing Properties on Screen

Find Duplicate Access keys

HelpContextID Assistant

Message Box Generator

Code Finder


Control Alignment

Project Wizard provides ten ways to align contols in relation to a source control.

Alignment Tools:

 Left Align Controls

 Right Align Controls

 Top Align Controls

 Bottom Align Controls

 Stack Controls Vertically (On Top)

 Stack Controls Vertically (On Bottom)

 Stack Controls Horizontally (To Left)

 Stack Controls Horizontally (To Right)

 Insert Control Vertically

 Insert Control Horizontally

See Also:

Nudging a Control

Nudge and Resize Tool

Control Resizing


Left Align Controls

When left aligning is used, the left edge  of all selected controls are aligned with the left edge of the source control.  Control sizes are not changed.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.

2	Select one or more controls (standard VB selection) that are to be bottom aligned with the source control.

3	Click the tool on the Project Wizard tool panel.

When aligning controls Project Wizard applies the alignment increment specified in global options.

See Also:

Global Options

Control Alignment


Global Options

Global options is used to manage a variety of user defined settings.  The are grouped into five categories:

Alignment

Nudge

Resize

Customize


Alignment Options

When aligning controls left, right, top or bottom, the increment specified for each type of alignment is applied when the alignment is performed.  The alignment is specified in in units.  The test controls will move with each change of these values to indicate the effect on alignment operations.

Example:

Assume the left align increment has been set to 20.  When aligning a selected control to the left edge of the source control, the selected control will be placed in a position whereby its right edge is 20 units from the source control's left edge.  The units will correspond to the form's scalemode property.  If it is set to pixels, then one unit = one pixel.


Nudge Options

When fine tuning the position of controls (nudging), the shift and control keys apply a different spacing factor when pressed in conjunction with either the left mouse button or one of the direction keys.  These values are expressed in units.  The value of one unit is always used when the neither the control or shift key is pressed during a nudge operation.

Example:

A value of 50 is specified for the shift nudge factor.  When the shift key and the left arrow keys are used together to move (nudge) a control, the control will be moved left by 50 units.  If the form's scalemode property is set to twips then one unit will equal one twip.


Resize Options

When fine tuning the size of controls (resizing), the shift and control keys apply a different sizing factor when pressed in conjunction with either the left mouse button or one of the arrow keys or pgup and pgdown.
These values are expressed in units.  The value of one unit is always used when the neither the control or shift key is pressed during a nudge operation.

Example:

A value of 50 is specified for the shift resize factor.  When the shift key and the left arrow keys are used together to resize a control, the control will be reduced in size by 50 units.  If the form's scalemode property is set to pixels then one unit equals one pixel.


Customize

These three options specify miscellaneous default actions by Project Wizard.

•	Prompt before actions..  If you want to be prompted before the action applied by any tool is performed, set this switch to the up position.  When this switch is off, the assigned tool's action will be applied without a prompt of any king.

•	Always on Top at Startup...  If you want Project Wizard to be a top most window by default at startup, set this switch to the up position.

•	Save workspace configuration...  Setting this switch to the up position, will cause Project Wizard to remember its window location at the end of the last session and use it on startup.

•	Image Editor... The default image editor is Paintbrush.  If you use a different image editor enter the program name with a fully qualified path.
You can use the Browse... button as an alternative to entering the program name and path.  Enter the default directory for .bmp files used by the image viewer when setting picture properties.  If you use the Browse... button to select the directory, select any file in that directory from the file dialog to select the directory.  The actual file selected is of no consequence.


Right Align Controls

When using right alignment, the right edge of all selected controls is aligned with the right edge of all selected controls.  Control sizes are not changed.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.

2	Select one or more controls (standard VB selection) that are to be bottom aligned with the source control.

3	Click the tool on the Project Wizard tool panel.

When aligning controls Project Wizard applies the alignment increment specified in global options.

See Also:

Global Options

Control Alignment


Top Align Controls

When top aligning controls, the top edges of all selected controls is aligned with the top edge of the source control.  Control sizes are not changed.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.

2	Select one or more controls (standard VB selection) that are to be bottom aligned with the source control.

3	Click the tool on the Project Wizard tool panel.

When aligning controls Project Wizard applies the alignment increment specified in global options.

See Also:

Global Options

Control Alignment


Bottom Align Controls

When using bottom alignment, the bottom edge of all selected controls are aligned with the bottom edge of the source control.  Control sizes are not changes.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.

2	Select one or more controls (standard VB selection) that are to be bottom aligned with the source control.

3	Click the tool on the Project Wizard tool panel.

When aligning controls Project Wizard applies the alignment increment specified in global options.

See Also:

Global Options

Control Alignment


Stack Controls Vertically On Top

This tool causes the selected control(s) to be stacked on top of the source control.  No resizing of the selected controls takes place.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.  This is the control on which the selected controls will be stacked.

2	Select one or more controls (standard VB selection) which are to be stacked over the source control.

3	Click the tool on Project Wizard's tool panel.

See Also:

Stack Controls Vertically on Bottom

Control Alignment


Stack Controls Vertically On Bottom

This tool causes the selected control(s) to be stacked vertically under the source control.  No resizing of the selected controls takes place.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.  This is the control under which the selected controls will be stacked.

2	Select one or more controls (standard VB selection) which are to be stacked under the source control.

3	Click the tool on Project Wizard's tool panel.

See Also:

Stack Controls Vertically on Top

Control Alignment


STACK CONTROLS LEFT
Stack Controls Horizontal (To Left)

This tool aligns the controls horizontally to the left of the source control.  No resizing of the selected controls takes place.

Procedure:

1	Indicate a source control by clicking the control with the right mouse button.  This is the control to which all the selected controls will be horizontally aligned.

2	Select one or more controls with the left mouse button (VB standard selection process) to be aligned horizontally to the left of the source control.

3	Click the tool on the Project Wizard tool panel.

Each control in sequence is aligned with the top edge and left edge of the preceding control until all selected controls have been 'stacked' to the left of the source control.  An alignment increment is applied to each control when aligning to the left edge of the preceding control.  This increment (the right align increment) can be changed through global options.

See Also:

Global Options

Stack Controls Horizontal (To Right)


STACK CONTROLS RIGHT
Stack Controls Horizontal (To Right)

This tool aligns the selected control(s) to the right of the source control.  No resizing of the selected controls takes place.

Procedure:

1	Indicate a source control by clicking the control with the right mouse button.  This is the control to which all the selected controls will be horizontally aligned.

2	Select one or more controls with the left mouse button (VB standard selection process) to be aligned horizontally to the left of the source control.

3	Click the tool on the Project Wizard tool panel.

Each control in sequence is aligned with the top edge and right edge of the preceding control until all selected controls have been 'stacked' to the right of the source control.  An alignment increment is applied to each control when aligning to the right edge of the preceding control.  This increment (the left align increment) can be changed through global options.

See Also:

Global Options

Stack Controls Horizontal (To Left)


Insert Control Vertically

This tool inserts the source control between the first and second selected controls in a vertical stack.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.

2	Select the controls (standard VB selection) between which the source control will be inserted.  The order of selection should be (1) the control under which the source control will be inserted and (2) the next control which will be under the source control after it is inserted.  (3) All remaining controls in the vertical stack.  All controls whose positions will be adjusted by the insertion of the source control should be selected to avoid having a control overlay another control.

3	Click the tool on the Project Wizard control panel.

Example:

Consider the following example of five stacked text boxes, text1 through
text5.  To insert Text6 (the source control) between Text3 and Text4, the
selected controls would look as follows prior to clicking the tool:

Notice that Text1 and Text2 are not selected since their position does not change.  Text6 is inserted after Text3.  Text4, Text5 and Text6 are all shifted down.  The correct selection order is Text3, Text4, Text5 and Text6.
Keep in mind that the selection order is critical and that the insertion point is between the first and second selected controls.  The resultant positions are as follows:

See Also:

Insert Control Horizontally


Insert Control Horizontally

This tool inserts the source control between the first and second selected controls in a vertical stack.

Procedure:

1	Indicate the source control by clicking it with the right mouse button.

2	Select the controls (standard VB selection) between which the source control will be inserted.  The order of selection should be (1) the control after which the source control will be inserted and (2) the next control which will be after the source control after it is inserted.  (3) All remaining controls in the horizontal stack.  All controls whose positions will be adjusted by the insertion of the source control should be selected to avoid having a control overlay another control.

3	Click the tool on the Project Wizard control panel.

Example:

Consider the following example of three horizontally stacked text boxes, text1 through text3.  To insert Text4 (the source control) between Text2 and Text3, the selected controls would look as follows prior to clicking the tool:

Notice that Text1is not selected since its position does not change.  Text4 is inserted after Text2.  Text3 is shifted right.  The correct selection order is Text2 then Text3.  Keep in mind that the selection order is critical and that the insertion point is between the first and second selected controls.  The resultant positions are as follows:

See Also:

Insert Control Vertically


Nudging a Control

In Visual Basic it is difficult to align controls perfectly with the mouse when you want a finer precision of alignment that the VB grid will allow.  With the nudge tool, you can fine tune your control positioning to a unit as small as one twip.

To nudge the alignment of one or more controls, select the control(s) with the mouse, as is customary in the VB design environment.  Use the arrows on the nudge panel to move the controls or simply use the arrow keys to change the alignment of the selected control and hence the Left and Top properties.  For a larger adjustment amount try the Shift and Control keys in conjunction with the arrows or left mouse button.  The magnititude of the shift and control keys can be adjusted through Global Options.

See Also:

Global Options

Resizing a Control

Nudge and Resize Tool


SELECTING A CONTROL


Resizing a Control

In Visual Basic it is difficult to resizing controls perfectly with the mouse when you want a finer precision of alignment that the VB grid will allow.  With the resize tool, you can fine tune your control sizes to a unit as small as one twip.

To resize one or more controls, select the control(s) with the mouse, as is customary in the VB design environment.  Use the arrows on the resize panel to size the controls or simply use the arrow keys to change the size of the selected controls and hence the Height and Width properties.  For a larger adjustment amount try the Shift and Control keys in conjunction with the arrows or left mouse button.  The magnititude of the shift and control keys can be adjusted through Global Options.

See Also:

Global Options

Nudging a Control

Nudge and Resize Tool


Nudge and Resize Tool

The Nudge and Resize functions are provided by the same tool panel.  To toggle the function from Nudge to Resize (or vice versa) click on the border of the panel.  The panel's caption displays the mode.  When Resize mode is selected, the panel is recessed.  The panel is raised in Nudge mode.

Using the keyboard:

The operation directional arrows can be duplicated with keystrokes.  Use the arrow keys for north, south, east and west operations.  Use Home for northwest, end for southwest, pgup for northeast and pgdn for southeast.

On / Off Switch:

The tool is always off at startup.  Flip the switch to the up position to activate the nudge/resize tool.

See Also:

Nudging a Control

Resizing a Control


Control Resizing

Three tools are available for resizing selected controls.  In addition, controls can be resized using the Nudge and Resize panel.

Resizing Tools:

 Size Control(s) by Width

 Size Control(s) by Height

 Size Control(s) Equal to Source Control

See Also:

Nudge and Resize Tool


Size Controls by Width

When sizing by width, the selected control(s) are made to be the same width as the source control.  The height of the selected control(s) is not changed.

Procedure:

1	Indicate the source control to size by.

2	Select one or more target controls (standard VB selection) to resize.

3	Click the tool on Project Wizard's tool panel.

See Also:

Size Controls by Height

Size Controls Equal to Source

Control Resizing


Size Controls by Height

When sizing by height, the selected control(s) are made to be the same height as the source control.  The width of the selected control(s) is not changed.

Procedure:

1	Indicate the source control to size by.

2	Select one or more target controls (standard VB selection) to resize.

3	Click the tool on Project Wizard's tool panel.

See Also:

Size Controls by Width

Size Controls Equal to Source

Control Resizing


Size Controls Equal to Source

When sizing control(s) equal to the source control, both the height and width of the selected control(s) are made to be equal to the source control>

Procedure:

1	Indicate the source control to size by.

2	Select one or more target controls (standard VB selection) to resize.

3	Click the tool on Project Wizard's tool panel.

See Also:

Size Controls by Width

Size Controls by Height

Control Resizing


Other Control Functions

Project Wizard includes the following additional functions for the manipulation of controls and control properties:

 Set or View TabIndex properties

 View Control Properties on Screen

 View Control Names on Screen

 Control Templates

 Apply Predefined Templates to Control(s)

 Clear Text Properties

 Copy Selected Properties to other controls

 Set or Reset FontBold Properties

 Set or Reset FontItalic Properties

 Set or Reset FontUnderline Properties

 Find Duplicate Access Keys

 Reindex Broken Control Arrays

 Set Color Property

 Message Box Generator

 Find Code or Constant Declaration

 Set Text Alignment property

 Help Context ID Assistant

 Set Access Key

 Set Picture Property


Setting TabIndex Properties

Property Wizard makes setting tabindex properties as easy as clicking the right mouse button.

To set the tabindex property of a series of controls, click the Tab button to
view the tabindex properties of all controls on screen.  You will notice that the Tab button is a state button and that while it is in its depressed state, all mouse clicks of the right mouse button are assumed to indicate a change in tab order.  When the right mouse button is clicked over a control the tabindex is set to the number shown in the current tab box.  After each click, the current tab is incremented by one so that the next control clicked on will have the next tabindex in sequence.  A series of controls can easily be set to correct tab sequence by clicking on them in the order you want them accessed by the user.  As each tab is set, a box appears to the right of the control's boundary to indicate the new tab setting.

The current tabindex assignment can be changed by entering the desired number in the tab box.  If you want to set the current tab back to zero, simply click the red 'X' or enter 0 in the current tab box.

You will normally want to do this where you have controls grouped inside of some type of container such as an index tab container.  A form may have many containers and you will undoubtedly jump around from one to the other.

Procedure:

1	Click the Tab Tool on Project Wizard's tool panel.

2	Reset the current tab index if necessary.

3	Click the right mouse button on the first tab to be set and then on each successive tab in sequence.

4	Release the Tab Tool when done by clicking it a second time.

Note that the current tab may be changed during the processing of setting tabs since the next right mouse click will set the control's tabindex to the
number in the tab box.  To change it at any time, just enter the new value in the tab box.

See Also:

Viewing control properties


View Control Properties on Screen

In many cases, it is desirable to have a bird's eye view of any particular property for all controls without the bother of having to access the property window.  An example of this might be the helpcontext id property of all controls.

To use this function, first select a property to view from the drop down list captioned 'Property'.  This list is populated with the properties of the current souce control.  If the property you want to view on screen is not in the list box, select a source control which contains the type of property you want to view.  The property value will only be shown for controls which possess a property of the type selected.  To clear the property values from the screen, release the property view button by clicking it a second time.

See Also:

Viewing or Setting TabIndex Properties

Viewing Control Names on Screen


View Control Names

The name tool ends the frustration involved when you're writing a code fragment and have forgotten a control name.  All the visible controls on
a form will have their name displayed on the screen inside the upper left corner of the control's boundary.  This tool is a state button, when it is released, the names will be cleared from the screen.  If another property is currently displayed on the screen when this tool is pressed, the name property will overwrite any other property in view on screen.

See Also:

Viewing or Setting TabIndex Property

Viewing Control Properties on Screen


Control Templates

A control template is a 'snapshot' of a control that includes its properties and their value.  A template may be used in a variety of

ways to save time in changing standard property values once a new control has been created.  For example, if you like labels with a teal background and a fixed single border, all you need to do is make a control of this type with the property settings you want and then add the template.  You can then later apply this template to all or selected controls of the same class to effect the new property settings.

Adding a control template:

To add a control template, bring up the control template window by clicking the control template tool from the Project Wizard window.  Project Wizard will only allow you to add a template for the current source control so be sure that you have designated a source control first.  Make sure that the desired property values have been set for the control through the VB properties window.  Click the new button, give your template a name and click the save button to save your template.  Note that you can save multiple copies of the same template by giving each a different name.  This is useful when you want to change a property setting for a different template name.  All that needs to be done is change the property (from the VB property window) and save the template again with a different name.

Excluding Properties from the Template:

It will normally be desirable to exclude certain properties from the template definition.  These properties could include properties such as left, top, caption, etc. that would cause conflicts if applied to more than one control.  Also, know that certain properties should be excluded although Property Wizard does not force you to exclude any property.  These types of properties include Name, hWnd, Parent and the like.  If you experience problems with VB during the use of the Apply template tool, you should examine the property list for a template to determine if you should have excluded a property.  Due to the variety of custom controls on the market it is impossible for us to determine which ones you must exclude, hence we have given you total freedom in defining your control templates.

Deleting a Control Template:

To delete a previously defined template, select it from the template list and click the cut button.  Project Wizard will prompt you for confirmation before actually deleting the template.

Modifying a Control Template:

If you need to modify an existing template, first delete the template then recreate the desired source control and add the template as described above in adding a control template.


Apply Predefined Templates

This tool applies a set of properties as defined in a template to all or selected controls of the same control class.  Controls of a different class whether selected or not, will not be changed even though they may possess some of the same properties.

See Also:

Control templates


Clear Text Properties

Controls with text properties always have some type of default text displayed within the newly created control.

This tool provides a quick way to clear the annoying default text in the controls without the need to select each one and erase the text through the VB properties window.


Copying Properties

This tool allows you to quickly copy a specified property to all or selected controls of the same class.

Procedure:

1	Indicate a source control possessing the type of property and property value you want to copy.

2	Select the property to copy from the drop down list captioned 'Properties'.

3	Select one or more target controls (standard VB selection).

4	Click the tool on the Project Wizard tool panel.

Caution:

Do not use Project Wizard to copy complex properties such as picture properties or datasource properties.  These properties require special handling by VB and are not designed to be manipulated by this tool.

See Also:

Control Templates

Set Picture Properties


Set Picture Property

The problem with the standard VB Load Picture dialog is that there is no way to view the picture before the property is set, not to mention that its more difficult to remember the name of a picture file than it is to remember what it looks like.  The picture tool lets you see that picture, jump to your image editor if needed, and even delete the picture file if necessary.  This tool processes only .bmp files.

Procedure:

1	Select the control (Standard VB selection)

2	Click the picture tool

3	Select the picture property to set

4	Click on the desired picture

5	Click the set button

Notes:

The image viewer only loads 50 images at a time.  If there are more than 50 .bmp files in the directory, you can click the More... button to view the next 50, etc.  If you need to go back to a previous set of bitmaps, click the Back... button.

The default directory for bitmaps is specified in global options as is the default image editor program.  The default image editor is Paintbrush unless you change it in global options.

This image viewer does not process .wmf or .ico files, only .bmp files.


Set or Reset FontBold Properties

The FontBold Tool allows you to change the fontbold property for all or selected controls that have a fontbold property.  This tool is a state button which, when pressed, sets the fontbold property to true for the applicable range of controls.  When the button is subsequently released, it sets the fontbold property to false for the applicable range in effect at that time.

Procedure:

1	Select one or more controls (standard VB selection).

2	Press the Bold tool to set the FondBold property.  Press it a second time (to release it) if you want to set this property to false.

See Also:

Set or Reset FontItalic Property

Set or Reset FondUnderline Property


Set or Reset FontItalic Properties

The FontItalic Tool allows you to change the fontitalic property for all or selected controls that have a fontitalic property.  This tool is a state button which, when pressed, sets the fontitalic property to true for the applicable range of controls.  When the button is subsequently released, it sets the fontitalic property to false for the applicable range in effect at that time.

Procedure:

1	Select one or more controls (standard VB selection).

2	Press the Underline tool to set the Underline property.  Press it a second time (to release it) if you want to set this property to false.

See Also:

Set or Reset FontBold Property

Set or Reset FontUnderline Property


Set or Reset FontUnderline Properties

The FontUnderline Tool allows you to change the fontunderline property for all or selected controls that have a fontunderline property. This tool is a state button which, when pressed, sets the fontunderline property to true for the applicable range of controls.  When the button is subsequently released, it sets the fontunderline property to false for the applicable range in effect at that time.

Procedure:

1	Select one or more controls (standard VB selection).

2	Press the Underline tool to set the Underline property.  Press it a second time (to release it) if you want to set this property to false.

See Also:

Set or Reset FontBold Property

Set or Reset FontItalic Property


Find Duplicate Access Keys

Duplicate access keys can often be hard to find especially if you have many controls within containers (such as index tabs) which may not be visible at the same time.  The find duplicate access keys tool will scan the current form for all captions containing duplicate access keys.  If no duplicates are found you will be informed with a message box.  If duplicate keys are found, an outline will be displayed showing the duplicate keys and control names using the keys.  You may print the list of duplicates if you desire.

See Also:

Set Access Key


Set Access Key

This tool lets you change the access key (mnemonic) for a label or other control with a caption property without using the keyboard to retype the caption.

Procedure:

1	Select the control(s) (Standard VB selection)

2	Click the key tool

3	Click the desired letter or click Cancel to abort the operation

Notes:

If you select a letter that is not in the caption, no change is made.  When the caption property is blank, the effect is the same, no change.


Reindex Control Arrays

When a control in a control array is deleted from a form, Visual Basic does not resequence the index properties of the remaining controls.
When operating on control arrays (such as text boxes) with code fragments such as for...next loops, broken arrays become undesirable because attempting to operate on an array element that doesn't exist will generate a VB error.  This tool provides an easy way to resequence the index of each control in the array.

Procedure:

1	Make any control in the array the source control by clicking it with the right mouse button.

2	Click the index tool.

3	A dialog will appear which reflects the current controls and index property values and the new value of the index property.  Choose Ok to accept or Cancel to cancel the reindexing operation.


Set Color Property

The set color tool provides a quick way to set the color property from the system palette or the set the color property by creating a custom color.  This tool may be used to set the background or the foreground color property.

Procedure:

1	Select the control(s) for which you want to set the color property.

2	Click the set color tool.

3	From the dialog, select the desired color or create a custom color.  Click Ok or Cancel the dialog if you wish.

4	Indicate which color property from the next dialog and Click Ok or Cancel to cancel the operation.


Message Box Generator

The message box generator creates a code fragment to display a message box using the buttons, icons and other options which you select from the message box generator screen.  Once the message box is accepted, the code fragment is placed on the clipboard.  You can then paste the code fragment into the desired module.  In addition, you can save the code fragment for use in other projects.

Procedure:

1	Click the message box tool to display the message box generator.

2	Select the desired icon, buttons and enter a title and message text for the message box.  To use a previously created message box, select the message box from the dropdown list.

3	Enter a name for this code fragment if you wish to save it.

4	Click the view button to view what the generated message box will look like.

5	Click the copy button to copy the code fragment to the clipboard.  Project Wizard will ask if you want to save the code.  Click Yes if you want to save this code for later use.

Notes:

To delete a previously saved message box, click the trash button.


Code Finder

Code finder allows you to quickly find a needed constant or function declaration from a text file.  Code finder copies the declarations selected to the clipboard from which you can paste them into a module.

Procedure:

1	Click the code find tool to display the code finder window.

2	Click the open button to open the file that contains the declarations.

3	Constant declarations are separated from function declarations and put into separate list boxes.  To quickly find the declaration needed, type the first few characters in either text box, the list box will seek to a matching declaration.  Select the declarations desired (the list boxes allow multiple selections.

4	Click the copy button to put the selections on the clipboard.

5	Close code finder and paste the declarations into your module.


Set Text Alignment Property

The text alignment tool lets you quickly change the alignment property of text boxes to multiline, centered, right or left aligned.  There is no need to access the properties window, however, depending on the font being used, you may need to change the height property or else the text may not display.

Procedure:

1	Select the text box(es) (Standard VB selection).

2	Click the text align tool.

3	From the dialog, select the type of alignment desired.

4	Click Ok to accept or Cancel to abort the operation.


HelpContextID Assistant

The HelpContextID Assistant is a tool that helps integrate help include file context string definitions with the HelpContextId property of the various controls on a form

Many help authoring tools create include files with context strings and their context id generated during the build of the help file.  Often these are included in an include file which is included in the help project file.  If your help authoring tool builds a help include file you can use the HelpcontextID Assistant to load the HelpContextID properties of controls from this include file.

Procedure:

1	When the HelpContextID Assistant is invoked it builds a list of all controls on the active form that have a HelpContextID property.  The value of this property is displayed in the list along with the control name.  The lower list box in the window will, at this point, be empty.

2	Use the open button to open your help author's include file.  This file will contain statements in the form '#define CONTEXT_STRING, VALUE.  The file is read and the strings and values are displayed in the lower list box.  If a context definition file exists, it will be processed after the lower list box is loaded.  Refer to the discussion of cdf files which follows later in this section.

3	Select the context string in the lower list box and associate it with the appropriate control by next selecting the control name in the upper list box and clicking the Set button or double clicking on the item in the upper list box.  The context string will then be reflected in the upper list box along with the control name to which it was associated.  As an alternative you can click the Set All button.  This causes Project Wizard to search the lower list box for the matching context string.  If one is found, the context id displayed in the lower list box is set for that control in the upper list box.  Note that the Set and Set All operations only change the association in the control list, they DO NOT actually change the control's HelpContextID property.  That is done when the Apply button (camera icon) is clicked.

4	After associating all controls with the desired context string, click the Apply button to change the HelpContextID property for the controls.

5	Click the save button to save the context string assignments to the .cdf file.

6	You can view the help information for any association by selecting it in the upper list box and clicking the view button.  Project Wizard calls the windows help system to display help based on the compiled help file selected.

CDF files:

CDF files have the same name as your help include with a file extension of '.cdf'.  For example if your help include file is 'projwiz.hh' then the context definition file will be 'projwiz.cdf'.  This file has the same structure as a standard windows ini file.  The section names are formnameHELPCONTEXTDEFS, where formname is the name of the form containing the controls defined.  Each control on the form has a key entry in the section in the form controlname=CONTEXT_STRING,VALUE.  Where controlname is the Visual Basic name for the control.  The cdf file is created automatically when you click the save button.

CDF file processing:

After the help include is loaded, an existing cdf file is read and for each control on the form (as displayed in the upper list box) the value and context string are automatically associated with the control name in the upper list box.  The list box entries are amended to reflect the association.

Recording the associations:

Once the associations have been made by the cdf file processing, click the snapshot button (camera icon) to set all helpcontextid properties to those reflected in the upper list box.

Once a cdf file has been built, which associates the context string with the control, any changes applied to helpcontextid values by the help authoring system can be automatically applied to the related controls by simply loading the help include file, which processes the cdf file and then clicking the snapshot button.  This snapshot of control helpcontextid values is automatically applied to all controls on the form.  This eliminates the tedious process of setting each value from a list of context strings.


Control Locking

Controls can be locked in position to prevent the accidental moving or resizing of the control which often occurs during the process of selecting the control with the left mouse button.

Note:

When multiple controls are selected control movement is allowed and locks are not enforced.  The assumption here is that the movement of the controls was intentional, which is normally the case.  This eliminates the extra steps required to unlock controls, move them with the mouse and then relock the controls.


Acknowledegments

Project Wizard was written in Visual Basic Version 3.0.  Visual Basic is a trademark of Microsoft Corporation.

Portions of Project Wizard were developed with SpyWorks-VB, a product of Desaware, Inc.  SpyWorks-VB is a trademark of Desaware, Inc.


Project Wizard Startup

To start Project Wizard, double click on its icon in the Visual Basic program group.  Project Wizard will load and, if Visual Basic itself is not running, it will be loaded.

After Project Wizard displays its copyright notice, it attaches to Visual Basic's 'Window' menu.  You can access Project Wizard either by selecting it from the VB menu or pressing Shift-F4 on the keyboard.  Project Wizard's form can be 'rolled up' at any time by clicking on the arrow in the top right corner next to it's window caption.  Project Wizard's window can be made to be 'Always on Top' at your discretion.  This option is a checked menu item on Project Wizard's system menu.

See Also:

Global Options


Closing Project Wizard

Project Wizard may be closed at any time by clicking the close button.  Closing Project Wizard causes its menu entry to be deleted (on the VB menu).  Whenever VB is unloaded, Project Wizard unloads itself automatically.

See Also:

Project Wizard Startup


Access keys

A character preceded by an ampersand ( & ).  Typically used for speedy keyboard access to a field.


cdf files

Context Definition Files.  A file created by the HelpContextID Assistant which reflects control names, context strings and the associated context id.


control template

A snapshot of a control, its properties and their value.  Templates are used to apply desired property values to a range of like controls.


intelligent locking

Intelligent locking means that controls are only repositioned to their lock position (and / or size) if they were accidentally moved.  This determination is made by comparing the relative distance moved or sized with the number of pixels indicated in global options.


pixels

The smallest unit of a display screen.  The number of pixels on a screen varies with display resolutions.


selected controls

Controls which have been selected in the Visual Basic development environment by clicking the left mouse button.  Multiple controls can be selected by using Ctrl left button or drawing a rubber band around the desired controls with the mouse.


source control

A control that has been selected using the right mouse key.  The current source control name is displayed in the source control box on the Property Wizard screen.  The source control is a control that is used by Property Wizard for reference in sizing, alignment and other control operations.


state button

A button that has normally two states, on and off.  A mouse click on the button will toggle the state from on to off and vice versa.


twip

A unit of screen measurement equal to 1/20 of a printers point.  There are approximately 1440 twips to a logical inch or 567 twips to a logical centimeter  the length of a screen item measuring one inch or one centimeter when printed.  A twip is a sreen independent unit used to ensure that placement and proportion of screen elements in your screen application are the same on all display systems.  Contrast with pixel, a screen-dependent unit of measurement.